CC "AdoScript" GET_TEMP_FILENAME SET s_TempFilename: (filename) SET n_PosFileName: (bsearch ( s_TempFilename , "\\" , (LEN s_TempFilename)-1 )) SET s_TempFolder: (copy ( s_TempFilename , 0 , n_PosFileName+1 )) SET s_BatFileName: ("annotationService.bat") SET s_ResultsFileName: ("Results") SET s_ClientName: ("wget.exe") SET s_BatFilePath: (s_TempFolder + s_BatFileName) SET s_ResultsFilePath: (s_TempFolder + s_ResultsFileName) SET s_ClientPath: (s_TempFolder + s_ClientName) CC "AdoScript" FILE_COPY from: ("db:\\" + s_BatFileName) to: (s_BatFilePath) CC "AdoScript" FILE_COPY from: ("db:\\" + s_ClientName) to: (s_ClientPath) CC "Modeling" GET_ACT_MODEL CC "Modeling" GET_SELECTED modelid: (modelid) SET s_selected_objid: (objids) SETL g_AnnotationServiceEndPointURL:(g_AnnotationServiceEndPoint+s_WSpath) SET sAnnotationPath:"" SET s_annotations:"empty" WHILE (1) { SYSTEM (s_BatFilePath+" "+g_AnnotationServiceEndPointURL+" "+s_ResultsFilePath+" "+s_ClientPath) with-console-window CC "AdoScript" FREAD file:(s_ResultsFilePath) binary:0 base64:0 SET s_annotations:(text) IF (s_annotations = "") { EXIT } SETL nStart:(search(s_annotations, ";;", 0)+LEN(";;")) SETL nEnd:(LEN(s_annotations)) SETL s_annotations_ids:(copy(s_annotations, nStart, nEnd-nStart)) SETL s_annotations:(copy(s_annotations, 0, nStart-2)) CC "AdoScript" LISTBOX entries:(s_annotations) toksep:(";") boxtext:("Annotations") title:("Select an Concept") SET sSelected:(selection) IF (endbutton = "ok") { SETL s_id_attrib:("") FOR s_selected_single in: (sSelected) sep:(";") { SETL n_selectedNameId:(VAL(copy(s_selected_single, 0, search(s_selected_single, "_", 0)))) SETL nCount:(0) FOR s_id in:(s_annotations_ids) sep:(";") { IF (n_selectedNameId = nCount) { IF (s_id_attrib = "") { SETL s_id_attrib:(s_id) SETL g_AnnotationServiceEndPointURL:(g_AnnotationServiceEndPoint+s_id_attrib) } ELSE { SETL s_id_attrib:(s_id_attrib+";"+s_id) } } SETL nCount:(nCount+1) } } CC "Core" SET_ATTR_VAL objid:(VAL s_selected_objid) attrname:(s_Annotation_AttrName) val:(s_id_attrib) IF (tokcnt(sSelected, ";") = 1) { CC "AdoScript" WARNINGBOX ("Do you want to continue?") yes-no IF (endbutton="no") { EXIT } } ELSE { EXIT } } ELSE { EXIT } }